<template>
  <div class="father">
    <h3>父组件</h3>
		<div v-show="phone">孙子给的手机:{{ phone }}</div>
		<Child :a="a" :b="b" :c="c" :d="d" :e="e" v-bind="{x:'100',y:'200'}" :sendPhone="sendPhone"/>
  </div>
</template>

<script setup lang="ts" name="Father">
	import Child from './Child.vue'
	import {ref} from 'vue'
	// 数据
	// 祖传孙
	let a=ref("1")
	let b=ref("2")
	let c=ref("3")
	let d=ref("4")
	let e=ref("5")
	let phone=ref("")
	// 方法
	// 孙传祖
	function sendPhone(value:string){
		phone.value=value
	}
</script>

<style scoped>
	.father{
		background-color: rgb(165, 164, 164);
		padding: 20px;
		border-radius: 10px;
	}
</style>
